﻿//
// Copyright (c) 2024 BPer
//
#ifndef INCLUDE_BPERCAPTURE_BPERVIDEOCAPTURE_H_
#define INCLUDE_BPERCAPTURE_BPERVIDEOCAPTURE_H_

#include <bperutil/buffer/BPerVideoBuffer.h>
#include <bperutil/sys/BPerLog.h>
#include <bperutil/sys/BPerThread2.h>
#include <bperutil/BPerAvInfoType.h>
#include <string>
#include <vector>

void bPer_get_camera_indexs(std::vector<int> *pvs,std::string pcamindex);
class BPerVideoCapture :public BPerThread {
public:
	BPerVideoCapture();
	virtual ~BPerVideoCapture();
public:
     int32_t cameraIndex;
     virtual int32_t init()=0;
     virtual void setVideoCaptureStart()=0;
     virtual void setVideoCaptureStop()=0;
     virtual void setOutVideoBuffer(BPerVideoBuffer *pbuf)=0;
     virtual void setPreVideoBuffer(BPerVideoBuffer *pbuf)=0;
     virtual int32_t getVideoCaptureState()=0;
     virtual void initstamp()=0;

     int32_t m_isStart;
     void stop();
protected:
    void run();
    virtual void startLoop()=0;
    virtual void stopLoop()=0;
    BPerVideoInfo *m_para;
};

#endif /* INCLUDE_BPERCAPTURE_BPERVIDEOCAPTURE_H_ */
